<?php 
  // Start the SESSION vars
	if (session_id() == "")
	{
		session_start();
	}
	// Include configuration variables
  include_once('/var/www/gde-1.0/htdocs/config.php');
  // Include the login top.php
  include_once(Config::base_path.Config::top_login_php); 
  // Include the login nav.php
  include_once(Config::base_path.Config::nav_login_php); 
   // Include builder functions
  include_once(Config::base_path.Config::builder_func_path."builder.func.php");  
  
  // Check session var from user selected table for query builder
  if(isset($_SESSION['selected_table']))
  {
    // Set the session vars for selected field from the selected tables posted from builder-2.php
    foreach($_SESSION['selected_table'] as $table)
    {
      $_SESSION['selected_field_'.$table] = $_POST['selected_field_'.$table];
    }
    
    // Build the inner joins based on what the user has selected for build query and present them in html
    buildInnerJoins($_SESSION['selected_database'],$_SESSION['selected_table']);
  }
  
  
  ?>